<div
  ng-switch="mode"
  ng-init="mode = 'visualization'"
>
  <h2 class="kuiLocalDropdownTitle">
    Add Panels
  </h2>

  <div class="kuiTabs">
    <button
      ng-class="{ 'kuiTab-isSelected': mode == 'visualization'}"
      class="kuiTab"
      ng-click="mode='visualization'"
      aria-label="List visualizations"
      data-test-subj="addVisualizationTab"
    >
      Visualization
    </button>

    <button
      ng-class="{ 'kuiTab-isSelected': mode == 'search' }"
      class="kuiTab"
      ng-click="mode='search'"
      aria-label="List saved searches"
      data-test-subj="addSavedSearchTab"
    >
      Saved Search
    </button>
  </div>

  <div class="list-group-item list-group-item--noBorder" ng-switch-when="visualization">
    <saved-object-finder
      use-local-management="true"
      type="visualizations"
      on-add-new="opts.addNewVis"
      on-choose="opts.addVis">
    </saved-object-finder>
  </div>

  <div class="list-group-item list-group-item--noBorder" ng-switch-when="search">
    <saved-object-finder
      type="searches"
      use-local-management="true"
      on-choose="opts.addSearch"
    ></saved-object-finder>
  </div>
</div>
